package Testking14;

class AA {
	String name = "A";
	String getName(){
		return name;
	}
	String greenting(){
		return "class A";
	}
}

class BB extends AA{
	String name = "B";

	String greenting(){
		return "class B";
	}

}
public class Client {

	public static void main(String[] args) {
		AA a = new AA();
		AA b = new BB();
		System.out.println(a.greenting() + "--" + a.getName());
		System.out.println(b.greenting() + "--" + b.getName());
	}


}
